#include <stdio.h>

void p1(int p[][10], int n) {
    int i, j;
    for (i = 0; i < n; i++) {
        for (j = 0; j < 10; j++) {
            printf("%2d ", p[i][j]);
        }
        printf("\n");
    }
    printf("\n");
}

void p2(int (*p)[10], int n) {
    int i, j;
    for (i = 0; i < n; i++) {
        for (j = 0; j < 10; j++) {
            printf("%2d ", p[i][j]);
        }
        printf("\n");
    }
    printf("\n");
}

int main() {
    int a[3][10] = {
        {1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
        {11, 12, 13, 14, 15, 16, 17, 18, 19, 20},
        {21, 22, 23, 24, 25, 26, 27, 28, 29, 30}
    };
    printf("p1:\n");
    p1(a, 3);
    printf("p2:\n");
    p2(a, 3);
    return 0;
}